<script>
fss.needPagePublishPermission = true;
fss.loginReady(function(){
fss.checkPermission(<?php echo $sf_user->getUid() ?>, 'publish_stream,manage_pages', function (enabled) {
    if (enabled)
        fss.needPagePublishPermission = false;
});
</script>

<ul class="breadcrumb">
	<li><?php echo tabbed_menu_item(__('Home'), '@backoffice', 'index') ?></li>
</ul>

<?
// Alert
?>
<div class="alert alert-warning">
	<button type="button" class="close" data-dismiss="alert">×</button>
	<i class="icon-warning-sign"></i> New Faceshop version available : Download 1.4.9.0 final !.
</div>

<?
// Fast task
?>
<div class="well well-small pull-left fast-task-block">
	<div id="fast-task-category" class="fast-task-icon"></div>
	<h6>
		<a href="#">New category</a>
	</h6>
	<p>
		Create a new category and organize your products.
	</p>
</div>

<div class="well well-small pull-left fast-task-block">
	<div id="fast-task-product" class="fast-task-icon"></div>
	<h6>
		<a href="#">New product</a>
	</h6>
	<p>
		Fill up your catalog with new articles and attributes.
	</p>
</div>

<div class="well well-small pull-left fast-task-block">
	<div id="fast-task-statistics" class="fast-task-icon"></div>
	<h6>
		<a href="#">Statistics</a>
	</h6>
	<p>
		Manage your activity with a thorough analysis of your e-shop.
	</p>
</div>

<div class="well well-small pull-left fast-task-block last-block">
	<div id="fast-task-employee" class="fast-task-icon"></div>
	<h6>
		<a href="#">New employee</a>
	</h6>
	<p>
		Add a new employee account and delegate part of your duties as shop owner.
	</p>
</div>

<div class="clearfix"></div>

<?
// Table stats
?>
<div class="pull-left" style="width:370px; margin-right:20px; font-weight:bold;">
	<h3 style="font-size:12px;">
		<span style="color:#3B5998">Monthly Statistics</span>
		<a href="#" class="pull-right" style="font-size:11px;">View more</a>
	</h3>
	<table class="table table-stripped">
		<tbody>
			<tr>
				<td width="150">Sales</td>
				<td></td>
			</tr>
			<tr>
				<td>Total registrations</td>
				<td></td>
			</tr>
			<tr>
				<td>Total orders</td>
				<td></td>
			</tr>
			<tr>
				<td>Product pages viewed</td>
				<td></td>
			</tr>
		</tbody>
	</table>
</div>

<div class="pull-left" style="width:370px; font-weight:bold;">
	<h3 style="font-size:12px;">
		<span style="color:#3B5998">Customers service</span>
		<a href="#" class="pull-right" style="font-size:11px;">View more</a>
	</h3>
	<table class="table table-stripped">
		<tbody>
			<tr>
				<td width="150">Thread unread</td>
				<td></td>
			</tr>
			<tr>
				<td>Thread pending</td>
				<td></td>
			</tr>
			<tr>
				<td>Thread pending</td>
				<td></td>
			</tr>
			<tr>
				<td>Total thread</td>
				<td></td>
			</tr>
		</tbody>
	</table>
</div>

<div class="clearfix"></div>

<script>
	$(function () {
		var d1 = [];
		for (var i = 0; i < 14; i += 0.5)
			d1.push([i, Math.sin(i)]);

		var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];

		// a null signifies separate line segments
		var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];
		
		$.plot($("#placeholder"), [ d1, d2, d3 ]);
	});
</script>
<div style="width:760px; font-weight:bold;">
	<h3 style="font-size:12px;">
		<span style="color:#3B5998">Statistics / Sales of the week</span>
		<a href="#" class="pull-right" style="font-size:11px;">View more</a>
	</h3>
	<table class="table table-stripped">
		<tbody>
			<tr>
				<td style="padding:10px 0 0 0;">
					<div id="placeholder" style="width:760px; height:350px" ></div>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<div style="width:760px; font-weight:bold;">
	<table class="table table-stripped table-bordered">
		<thead class="table-header">
			<tr>
				<th>ID</th>
				<th>Customer Name</th>
				<th>Status</th>
				<th>Total</th>
				<th>Action</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>1</td>
				<td>John Doe</td>
				<td>Awaiting cheque payment</td>
				<td>625,98 €</td>
				<td></td>
			</tr>
		</tbody>
	</table>
</div>